package start.spring.basic.flowable.enums.flowable;

/**
 * 
 * ****************************************************************************
 * 部署状态
 *
 * @author(作者)：xuyongyun	
 * @date(创建日期)：2023年8月29日
 ******************************************************************************
 */
public enum DeployStatus {

	SUSPENDED("suspended","挂起"),
	ACTIVE("active","激活");
	
	/**
     * 状态
     */
    private final String status;

    /**
     * 说明
     */
    private final String remark;
    
    DeployStatus(String status,String remark){
    	this.status = status;
        this.remark = remark;
    }
    
    public String getStatus() {
        return status;
    }

    public String getRemark() {
        return remark;
    }
    
    public static boolean statusValid(String status) {
    	boolean statusValid = false;
    	DeployStatus[] statusValids = values();
    	for(DeployStatus deployStatus:statusValids) {
    		if(deployStatus.status.equals(status)) {
    			statusValid = true;
    			break;
    		}
    	}
    	return statusValid;
    }
    
    public static String getRemark(String status) {
    	DeployStatus[] statusValids = values();
    	for(DeployStatus deployStatus:statusValids) {
    		if(deployStatus.status.equals(status)) {
    			return deployStatus.remark;
    		}
    	}
    	return null;
    }
}
